﻿@{
    ViewBag.Title = "主页";
}
<h2>
</h2>
<p>
    若要了解有关 ASP.NET MVC 的更多信息，请访问 <a href="http://asp.net/mvc" title="ASP.NET MVC 网站">http://asp.net/mvc</a>。
    <form method="post" action="@Url.Action("save")">
    @{int i = 0;}
    @foreach (var item in ViewBag.List)
    {
        <input type ="text" name="name-@i" value=@item.name />
        <input type ="hidden" name="id-@i" value=@item.id />
                                            i++;
    }
    <input type="submit" value="svae" />
    </form>
    @foreach (var item in ViewBag.List)
    {
        @item.name;
    }
    <br />
    @ViewBag.Count
</p>
